/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mac
 * Date: 2022-09-03
 * Time: 16:02
 */
public class LinkedListWork {
    public static void main(String[] args) {

        DoubleLinkedList doubleLinkedList = new DoubleLinkedList();
        /*doubleLinkedList.addLast(1);
        doubleLinkedList.addLast(2);
        doubleLinkedList.addLast(3);
        doubleLinkedList.addLast(4);
        doubleLinkedList.addLast(5);*/

        doubleLinkedList.addFirst(5);
        doubleLinkedList.addFirst(4);
        doubleLinkedList.addFirst(3);
        doubleLinkedList.addFirst(2);
        doubleLinkedList.addFirst(1);

        doubleLinkedList.display();
        System.out.println("===========");
        /*doubleLinkedList.removeAllKey(5);
        doubleLinkedList.display();*/
        doubleLinkedList.addIndex(3,99);
        doubleLinkedList.display();
        System.out.println("+++++++++++");
        doubleLinkedList.clear();
        doubleLinkedList.display();
    }
}
